package com.xfs.service.impl;

import com.xfs.entity.po.User;
import com.xfs.entity.vo.UserVO;
import com.xfs.mapper.UserMapper;
import com.xfs.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author dwj
 * @Date 2022-05-24 12:20
 */

@Service
@Slf4j
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return userMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(User user) {
        return userMapper.insert(user);
    }

    @Override
    public int insertSelective(User user) {
        return userMapper.insertSelective(user);
    }

    @Override
    public User selectByPrimaryKey(Integer id) {
        return userMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(User user) {
        return userMapper.updateByPrimaryKeySelective(user);
    }

    @Override
    public int updateByPrimaryKey(User user) {
        return userMapper.updateByPrimaryKey(user);
    }

    @Override
    public List<User> selectList() {
        return userMapper.selectList();
    }

    @Override
    public int insertBatch(List<User> list) {
        return userMapper.insertBatch(list);
    }

    @Override
    public List<String> selectUserEmail() {
        return userMapper.selectUserEmail();
    }

    @Override
    public int deleteBatch(String[] ids) {
        return userMapper.deleteBatch(ids);
    }

    @Override
    public int updateStatusById(Short status, int id) {
        return userMapper.updateStatusById(status, id);
    }

    @Override
    public List<User> listCodition(UserVO userVO) {
        return userMapper.listCondition(userVO);
    }
}
